package cn.stronglink.assetmanage.business.inspection.view;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import java.io.IOException;

import cn.stronglink.assetmanage.R;
import cn.stronglink.assetmanage.business.inspection.model.PatrolModel;
import cn.stronglink.assetmanage.business.inspection.model.RepairModel;
import cn.stronglink.assetmanage.business.inspection.presenter.PatrolPresenter;
import cn.stronglink.assetmanage.dao.DaoManager;
import cn.stronglink.assetmanage.dao.SyncTypesDao;
import cn.stronglink.assetmanage.entity.SyncTypes;
import cn.stronglink.assetmanage.utils.Constants;
import okhttp3.Call;
import okhttp3.Response;

/**
 * 巡检维修入口
 * Created by zhengjinglan on 2018/6/13.
 */

public class PatrolFragment extends Fragment {

    private PatrolView patrolView;
    private PatrolModel patrolModel;
    private PatrolPresenter patrolPresenter;
    private TextView txt_title_left,txt_title_right,txt_main_title;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_patrol,container,false);
        try {
            initViewAndData(view);
        }catch (Exception e){
            e.printStackTrace();
        }

        return view;
    }

    private void initViewAndData(View view) {
        txt_title_left = this.getActivity().findViewById(R.id.txt_left_title);
        txt_title_left.setVisibility(View.GONE);
        txt_title_right = this.getActivity().findViewById(R.id.txt_right_title);
        txt_title_right.setVisibility(View.GONE);
        txt_main_title = this.getActivity().findViewById(R.id.txt_main_title);
        txt_main_title.setText("巡检维修");

        patrolView = new PatrolView(this,view);
        patrolModel = new PatrolModel();
        patrolPresenter = new PatrolPresenter(getContext(),patrolView, patrolModel);




    }
    @Override
    public void onDestroyView() {
        super.onDestroyView();
    }

}
